package utils

import "sort"

// 格式化签名
func FormatSign(signArgs map[string]interface{}) string {
	var sign string = ""
	var keys []string

	for signKey := range signArgs {
		keys = append(keys, signKey)
	}
	sort.Strings(keys)
	for index, key := range keys {
		if index > 0 {
			sign += "&"
		}
		sign += key + "=" + signArgs[key].(string)
	}
	return sign
}
